1. Linear approximations.
If
is a function which is differentiable at
, then its linearization at
a
is the function
given by the formula
.
Notice that
is just the equation of the tangent line at
. A main idea of the section on the differential is that the tangent line gives a good approximation to the function for values of
x
near
.
Consider the function
> f:=x->sqrt(x+3);
Let us find the linearization at
and determine how good an approximation it gives to the original function. First, we find the values of the function and its derivative at
.
> f(1);D(f)(1);
Next, we define the linearization at
.
> L:=x->1/4*(x-1)+2;
Just to be sure that this really is the tangent line to the curve
at the point (1,2), let us graph the function and its
tangent line near this point.
> plot([f(x),L(x)],x=0..2);
Notice that the graph of the function and its tangent line are close on the whole interval
. To be more precise about the notion of closeness, let us determine an interval on which
.
> solve(abs(f(x)-L(x)) < .1,x);
Sometimes Maple cannot find the solution for you using the solve command. Then you can plot
near
and find an interval by experiment. For example, in this case, if we let
, and plot
on the interval (
,) then we will see that the inequality
is satisfied.
> delta:=2;plot([-.1,.1,abs(f(x)-L(x))],x=1-delta .. 1+delta,color=[red,red,blue]);
From this plot, we know that the tangent line can be used to estimate the value of
to within .1 on the interval (
). Actually, using the interval we obtained from the solve command, we see that the tangent line estimates the value of
to within .1 on the interval (-1.1, 3.9). Using this fact, we can estimate values of
for
x
values in this interval very easily. For example, if we want to approximate
, we can simply evaluate
> L(0.02);
and be sure that our estimate is off by less than 0 .1. Although we did this by Maple, it is easy to calculate values of a linear function by hand as well, so if you are ever on a boat in a lake without a calculator, you can easily estimate values of even complicated functions by using the tangent line.
Submission:
For the function
, find the linearization at
and use it to estimate the value of
. Then find an interval including
on which the linear approximation is accurate to within 0.1. Show how you found this interval. Finally, illustrate this fact by plotting on a single graph the function and its linearization on this interval.
Submission worksheet:
2. Estimating the error in using the linearization to approximate the function.
In this activity, we will estimate the magnitude of the error in using the linearization in place of the function over a specified interval. First, let us define the linear approximation for a function at a point (
). Of course, this linear approximation is just the tangent line at
.
> L:=x->D(f)(a)*(x-a)+f(a);
Let us study a specific function, and a specific value of a .
> a:=1;
> f:=x->(x+1)*exp(x)+5;
> L(x);
> plot([L,f],0..2,0..40,color=[blue,red]);
This plot gives us a visual estimate of the absolute error
over the interval [
]. We could also plot this absolute error directly.
> plot(abs(f(x)-L(x)),x=0..2);
Note that at
, the error is equal to zero. This is no accident, because the tangent line always agrees with the function at the point (
). Now suppose that we wanted to control the error, by requiring that
, for some small positive value of
. We would like to find a value of
such that the inequality
is satisfied if
. Let us choose
, and see how to do this by using the graph. First we define
, and choose a preliminary estimate for
.
> epsilon:=.1;delta:=.2;
> plot([-epsilon,abs(f(x)-L(x)),epsilon],x=a-delta..a+delta,color=[blue,red,blue]);
If the value of delta that we chose worked, the graph of the function would lie entirely between the two blue lines. It appears that if we modify our choice of delta, we can accomplish this task.
> delta:=.1;
> plot([-epsilon,abs(f(x)-L(x)),epsilon],x=a-delta..a+delta,color=[blue,red,blue]);
From the plot above, we see that if
, then
.
Submission:
Using the ideas presented above
, estimate the magnitude of the error in using the linearization in place of the function
over the interval [
] using
. You should perform the following steps.
(a) Plot the function over the interval.
(b) Find the linearization L of the function at 1/2 .
(c) Plot f and L together on a single set of axes.
(d) Plot the absolute error
over the interval and find its maximum value.
(e) From your graph in part iv), estimate as
large a delta >0 as you can satisfying
implies
for
= 0.5 , 0.1, and 0.01 . Then check graphically to see if your delta - estimate holds true.
Submission worksheet:
3. The quadratic approximation to a function.
The quadratic approximation to a function f is defined by:
>
Let us define it as a function in Maple.
> Q:=x-> (D@@2)(f)(a)*(x-a)^2/2+D(f)(a)*(x-a)+f(a);
Let us consider the function
.
> f:=x->1/(1-x);
Let us graph the function and its quadratic approximation near
.
> a:=0;
> plot([Q,f],a-1..a+1,f(a)-1..f(a)+1,color=[blue,red]);
Certainly, we do see that the quadratic approximation is very close to the value of the function, near zero. There is something else very interesting going on in this picture. In order to see what it is, you will be asked in the submission part to graph some other quadratic approximations.
Submission:
(a) Find the quadratic approximation to the following functions and graph the function together with its quadratic approximation:
at
.
at
.
(b) Make an observation based on the three plots you have seen. This observation should lead you to a conjecture or guess, about the relationship between the graph of a function and that of its quadratic approximation. Write your observation and conjecture in one or two paragraphs.
Submission worksheet:
The quadratic approximation formula is similar to the linear approximation formula, and it is given by:
Sometimes we call the graph of the quadratic approximation formula "the parabola of best fit", by analogy with the tangent line, which is the "line of best fit". Let us compute the formula for the quadratic approximation of the function of activity 1 at
using Maple.
> f:=x->sqrt(x+3);
> Q:=x->f(1)+D(f)(1)*(x-1)+1/2*(D@@2)(f)(1)*(x-1)^2;
Notice that Maple does not show you the values that it substitutes in for
,
, and
. But we can find the equation by asking Maple to evaluate the function
at
.
> Q(x);
Let us plot the function and its quadratic approximation at
on the same graph.
> plot([f(x),Q(x)],x=-3..5,color=[blue,red]);
We can also use Maple to tell us the interval on which the approximation is accurate to within .1.
> solve(abs(f(x)-Q(x))<0.1,x);
Notice that this interval is much larger than the interval on which the linear approximation is accurate to within .1 that you computed in the previous activity. Let us use the quadratic approximation to estimate the value of
, and compare it to the actual value.
> Q(0.02);f(0.02);
Submission:
For the function
, find the quadratic approximation at
and use it to estimate the value of
. Then find an interval including
on which the quadratic approximation is accurate to within 0.1. Finally, illustrate this fact by graphing the function, its linearization (from activity 1) and its quadratic approximation on this interval in the same picture.
Submission worksheet: